﻿using MediatR;
using RBAC.Api.Erroc;
using System.ComponentModel.DataAnnotations;

namespace RBAC.Api.Writh.Command.ContentManagement
{
    /// <summary>
    /// 添加轮播图表
    /// </summary>
    public class AddCarouselChartCommand : IRequest<APIResult<object>>
    {
        /// <summary>
        /// 图片路径
        /// </summary>
        [StringLength(512)]
        public string? ImageUrl { get; set; }

        /// <summary>
        /// 标题
        /// </summary>
        [StringLength(100)]
        public string? Title { get; set; }

        /// <summary>
        /// 跳转链接
        /// </summary>
        [StringLength(512)]
        public string? LinkUrl { get; set; }

        /// <summary>
        /// 生效时间
        /// </summary>
        [Required]
        public DateTime? StartTime { get; set; }

        /// <summary>
        /// 失效时间
        /// </summary>
        [Required]
        public DateTime? EndTime { get; set; }

        /// <summary>
        /// 状态：0-禁用/下架，1-启用/上架
        /// </summary>
        [Required]
        public bool Status { get; set; }

        /// <summary>
        /// 排序序号
        /// </summary>
        [Required]
        public int SortOrder { get; set; }
    }
}
